package com.jp.vn.main;

import java.util.ArrayList;

import com.jp.vn.CustomAdapter.ThoiGianAdapter;
import com.jp.vn.Object.ThoiGian;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

public class FragmentDemGio extends Fragment {
	
	ArrayList<ThoiGian> arrayGio = new ArrayList<ThoiGian>();
	ListView list;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.fragment_demgiophut, container, false);
		list = (ListView) view.findViewById(R.id.mylist);
		
		dumyData();
		
		ThoiGianAdapter adapter = new ThoiGianAdapter(view.getContext(), arrayGio);
		list.setAdapter(adapter);
		
		return view;
	}
	
	void dumyData(){
		
		arrayGio.add(new ThoiGian("1 giờ", "いちじ", "ichi ji"));
		arrayGio.add(new ThoiGian("2 giờ", "にじ", "ni ji"));
		arrayGio.add(new ThoiGian("3 giờ", "さんじ", "san ji"));
		arrayGio.add(new ThoiGian("4 giờ", "よじ", "yo ji"));
		arrayGio.add(new ThoiGian("5 giờ", "ごじ", "go ji"));
		arrayGio.add(new ThoiGian("6 giờ", "ろくじ", "roku ji"));
		arrayGio.add(new ThoiGian("7 giờ", "しちじ", "shichi ji"));
		arrayGio.add(new ThoiGian("8 giờ", "はちじ", "hachi ji"));
		arrayGio.add(new ThoiGian("9 giờ", "くじ", "ku ji"));
		arrayGio.add(new ThoiGian("10 giờ", "じゅうじ", "juu ji"));
		arrayGio.add(new ThoiGian("11 giờ", "じゅういちじ", "juu ichi ji"));
		arrayGio.add(new ThoiGian("12 giờ", "じゅうにじ", "juu ni ji"));
		arrayGio.add(new ThoiGian("Mấy giờ", "なんじ", "nan ji"));
		
	}
	
}
